package semantic_compute.common.yago_helper;

import com.orientechnologies.orient.core.id.ORecordId;
import com.tinkerpop.blueprints.Vertex;

/**
 * Created by julianzliu on 4/21/2017.
 */
public class YagoQueryHelper {


    public static String getRidOfVertex(Vertex v){
        String rid = ((ORecordId)v.getId()).toString();
        return rid;
    }

    public static String phraseToQuery(String phrase){
        String[] phrases = phrase.split(" ");
        String query = "+eng";
        for(String token: phrases){
            query += " +" + token;
        }
        return query;
    }


    public static String phraseNoneEngToQuery(String phrase){
        String[] phrases = phrase.split(" ");
        String query = "";
        for(String token: phrases){
            query += " +" + token;
        }
        return query;
    }




}
